const BASE_URL = 'https://easy-mock.com/mock/5eebfac84d226b23f958dfde'
export const myRequest = (options)=>{
	return new Promise((resolve,reject)=>{
		uni.request({
			url:BASE_URL+options.url,
			method:options.method || 'GET',
			data:options.data || {},
			success:(res)=>{
				if(res.data.stauts !== 0){
					return uni.showToast({
						title:'获取数据失败。'
					})
				}
				resolve(res)
			},
			fail:(err)=>{
				uni.showToast({
					titile:'请求接口失败。'
				})
				reject(err)
			}
		}) 
	})
}
